package com.cloudkinto.vo.user;

import com.cloudkinto.common.utils.StringsUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @author zhangyy
 * @date 2020/4/18 17:13
 * @description:
 */
@Data
public class UserListPageRes {

    private Long id;
    /**
     * 账号
     */
    private String userAccount;

    /**
     * 用户名
     */
    private String userName;

    private String userMail;

    private String roleName;

    private Long roleId;

    private Integer roleType;


    /**
     * 电话
     */
    @NotBlank(message = "pls.input.phone")
    private String userPhone;

    private String companyCode;
    private String companyName;
    private Long companyId;


    private Integer userStatus;
    private String userStatusName;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+9")
    private Date createTime;


    public String getUserStatusName() {
        return StringsUtil.createI18Message(userStatusName);
    }
}
